In modular arithmetic, the method of successive substitution is a method of solving problems of simultaneous congruences by using the definition of the congruence equation. It is commonly applied in cases where the conditions of the Chinese remainder theorem are not satisfied.
There is also an unrelated method of successive substitution, a randomized algorithm used for root finding, not currently discussed here.[1]
For example, consider the simple set of simultaneous congruences
Now, for x ≡ 3 (mod 4) to be true, x = 3 + 4j for some integer j. Substitute this in the second equation
since we are looking for a solution to both equations.
Subtract 3 from both sides (this is permitted in modular arithmetic)
We simplify by dividing by the greatest common divisor of 4,2 and 6. Division by 2 yields:
The Euclidean modular multiplicative inverse of 2 mod 3 is 2. After multiplying both sides with the inverse, we obtain:
or
For the above to be true: j = 2 + 3k for some integer k. Now substitute back into 3 + 4j and we obtain
Expand:
to obtain the solution
In general:
If the moduli are coprime, the Chinese remainder theorem gives a straightforward formula to obtain the solution.
http://en.wikibooks.org/wiki/Discrete_Mathematics/Modular_arithmetic